package com.atguigu.day20.homework.h1;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/25 19:18
 * @注释
 */
public class HomeWork01{
    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 1; i <= 100; i++) {
                    if (i % 2 == 0) {
                        System.out.println( Thread.currentThread().getName() + "-->" + i);
                    }
                }
            }
        },"子线程").start();

        for (int i = 1; i <= 100; i++) {
            if (i % 2 == 1) {
                System.out.println(Thread.currentThread().getName() + "主线程-->" + i);
            }
        }



    }

}
